package com.yuma.schedule;

import java.time.LocalDateTime;
import java.util.Timer;
import java.util.TimerTask;

public class JdkSchedule {
    public static void main(String[] args) {
        new Timer().schedule(new TimerTask(){
            @Override
            public void run() {
                System.out.println("time:" + LocalDateTime.now());
            }
        },  1000L,  2000L);
    }
}
